<template>
	<top_bg class="top">
		<template v-slot:title>
			<p>{{title}}</p>
		</template>
	</top_bg>
	<div class="bg">
	<img src="../assets/goods_left.png" class="left_btn" @click="toMe">
	<!-- <van-button icon="../assets/left.png" type="primary" hairline class="left_btn2" to="me" color="#D7DAFC" /> -->
	<van-tabs v-model:active="active" @click-tab="onClickTab" class="mytab" background="rgba(0, 0, 0, 0)">
		<van-tab title="All">

			<div class="cart_item" v-for="(item,index) in allItems" :key="item">
				<!-- <img :src=uploads_url+item.thumb class="purchased_one_cart_item_img" /> -->
				<img width="140" :src=picArray1[index] />
				<div class="right">
					<div class="p1 flex" style="margin-right: 80px;">
						<div>
							<p v-if="item.huode !== '0'" class="p1"
								style="margin-top: 10px; margin-bottom: 10px; width:150; color: #EC4228;">Winning code:
								{{item.q_user_code}}
							</p>
							<!-- <p v-if="parseInt(item.gonumber) > 1" class="order_one_cart_item_img_text2" >Prize draw code: {{ getOneCode(item.goucode)}} </p> -->
							<!-- <p class="order_one_cart_item_img_text3"> {{convertTime(item.paytime2)}}</p> -->
							<p class="p1" style="margin-top:25px;margin-bottom: 10px; width:150">
								{{item.title.length > 12?item.title.substr(0,12)+"...":item.title}}
							</p>
							<!-- 							<p class="description p1" style="margin:0; padding:0"
								v-if="one_item.description != undefined">
								{{one_item.description.length > 60 ? one_item.description.substr(0,60)+'...':one_item.description}}
							</p> -->
						</div>
					</div>
					<div class="p1 moneyNumber">
						<span class="money"
							style="color:#EC4228; margin-right:20px">AED:{{(item.yunjiage*item.gonumber).toFixed(2)}}</span>
						<van-button round v-if="item.huode !=='0'" class="get_reward_btn"
							@click="editAddress(item)">Get</van-button>
						<van-button round class="view_code_btn" v-if="parseInt(item.gonumber) >= 1 && item.huode ==='0'"
							@click="viewCode(item)">View code</van-button>
					</div>
				</div>
			</div>

			<order_form v-if="false" v-for="(item,index) in allItems" :key="item" class="subtab1">
				<!-- {{index}} -->

				<template v-slot:order_one_cart_item_img>
					<!-- 			{{item}}
								{{uploads_url+item}} -->
					<!-- {{uploads_url+one_item.thumb}} -->
					<!-- <img src="../../assets/cart_item_img.png" class="order_one_cart_item_img" /> -->
					<!-- <img :src=uploads_url+item.thumb class="purchased_one_cart_item_img" /> -->
					<img width="140" :src=picArray2[index] />
					<p v-if="item.huode !== '0'" class="order_one_cart_item_img_text2">Winning code:
						{{item.q_user_code}}
					</p>
					<!-- <p v-if="parseInt(item.gonumber) > 1" class="order_one_cart_item_img_text2" >Prize draw code: {{ getOneCode(item.goucode)}} </p> -->
					<p class="order_one_cart_item_img_text3"> {{convertTime(item.paytime2)}}</p>
					<!-- 					<p v-if="item.huode ==='0'" class="order_one_cart_item_img_text3"> {{convertTime(item.time)}}</p> -->
				</template>

				<template v-slot:order_one_cart_item_desc>
					<!-- <img src="../../assets/cart_item_img.png" class="order_one_cart_item_desc" /> -->
					<div class="purchased_one_cart_item_desc">
						<p>{{item.title.length > 12?item.title.substr(0,12)+"...":item.title}} </p>
						<!-- <p>{{item.title}} </p> -->
					</div>
				</template>


				<template v-slot:order_one_cart_item_price>
					<div class="purchased_one_cart_item_price">
						<p>AED:{{(item.yunjiage*item.gonumber).toFixed(2)}}</p>
					</div>
				</template>

				<template v-slot:order_one_cart_item_right>
					<div class="purchased_one_cart_item_right">
						<slot name="order_one_cart_item_right">
							<!-- <van-button square text="state" /> -->
							<van-button round v-if="item.huode !=='0'" class="get_btn"
								@click="editAddress(item)">Get</van-button>
						</slot>
						<van-button round class="view_code" v-if="parseInt(item.gonumber) >= 1 && item.huode ==='0'"
							@click="viewCode(item)">View code</van-button>
					</div>

				</template>

				<template v-slot:order_one_cart_item_right_del>
					<div class="purchased_one_cart_item_right_win">
						<!-- <slot name="order_one_cart_item_right_del"> -->
						<!-- <van-button square text="state" /> -->
						<p v-if="item.huode !=='0'">WIN</p>

						<!-- </slot> -->
					</div>
				</template>
			</order_form>

		</van-tab>
		<van-tab title="To be draw" @click="toBeDraw">
			<div class="cart_item" v-for="(item,index) in toBeDrawItems" :key="item">
				<!-- <img :src=uploads_url+item.thumb class="purchased_one_cart_item_img" /> -->
				<img width="140" :src=picArray2[index] />
				<div class="right">
					<div class="p1 flex" style="margin-right: 80px;">
						<div>
						<!-- 	<p v-if="item.huode !== '0'" class="p1"
								style="margin-top: 10px; margin-bottom: 10px; width:150; color: #EC4228;">Winning code:
								{{item.q_user_code}}
							</p> -->	 
							<!-- <p v-if="parseInt(item.gonumber) > 1" class="order_one_cart_item_img_text2" >Prize draw code: {{ getOneCode(item.goucode)}} </p> -->
							<!-- <p class="order_one_cart_item_img_text3"> {{convertTime(item.paytime2)}}</p> -->
							<p class="p1" style="margin-top:25px;margin-bottom: 10px; width:150">
								{{item.title.length > 12?item.title.substr(0,12)+"...":item.title}} 
							</p>
							<p class="p1" style="margin-top:-30px; margin-left: 160px;color: #EC4228;" v-if="item.huode !=='0'">WIN</p>
							<!-- 							<p class="description p1" style="margin:0; padding:0"
								v-if="one_item.description != undefined">
								{{one_item.description.length > 60 ? one_item.description.substr(0,60)+'...':one_item.description}}
							</p> -->
						</div>
					</div>
					<div class="p1 moneyNumber">
						<span class="money"
							style="color:#EC4228; margin-right:20px">AED:{{(item.yunjiage*item.gonumber).toFixed(2)}}</span>
						<van-button round v-if="item.huode !=='0'" class="get_reward_btn"
							@click="editAddress(item)">Get</van-button>
						<van-button round class="view_code_btn" v-if="parseInt(item.gonumber) >= 1 && item.huode ==='0'"
							@click="viewCode(item)">View code</van-button>
					</div>
				</div>
			</div>
			<order_form v-if="false" v-for="(item,index) in toBeDrawItems" :key="item.id">
				<!-- {{index}} -->

				<template v-slot:order_one_cart_item_img>
					<!-- 			{{item.id}}
							{{uploads_url+item.id}} -->
					<!-- {{uploads_url+item.thumb}} -->
					<!-- <img src="../../assets/cart_item_img.png" class="order_one_cart_item_img" /> -->
					<!-- <img :src=uploads_url+item.thumb class="purchased_one_cart_item_img" /> -->
					<img width="140" :src=picArray[index] />
				</template>

				<template v-slot:order_one_cart_item_desc>
					<!-- <img src="../../assets/cart_item_img.png" class="order_one_cart_item_desc" /> -->
					<div class="purchased_one_cart_item_desc">
						<p>{{item.title.length > 12?item.title.substr(0,12)+"...":item.title}} </p>
						<!-- <p>{{item.title}} </p> -->
					</div>
				</template>


				<template v-slot:order_one_cart_item_price>
					<div class="purchased_one_cart_item_price">
						<p>AED:{{(item.yunjiage*item.gonumber).toFixed(2)}}</p>
					</div>
				</template>

				<template v-slot:order_one_cart_item_right>
					<div class="purchased_one_cart_item_right">
						<slot name="order_one_cart_item_right">
							<!-- <van-button square text="state" /> -->
							<van-button round v-if="item.huode !=='0'" class="get_btn"
								@click="editAddress(item)">Get</van-button>
						</slot>
						<van-button round class="view_code" v-if="parseInt(item.gonumber) >= 1 && item.huode ==='0'"
							@click="viewCode(item)">View code</van-button>
					</div>

				</template>

				<template v-slot:order_one_cart_item_right_del>
					<div class="purchased_one_cart_item_right_win">
						<!-- <slot name="order_one_cart_item_right_del"> -->
						<!-- <van-button square text="state" /> -->
						<p  v-if="item.huode !=='0'">WIN</p>
						<!-- </slot> -->
					</div>
				</template>


			</order_form>
		</van-tab>

		<van-tab title="Winner" @click="toWinner">
			<!-- 	<one_cart_item>
			</one_cart_item>
			Winner 3 -->
			<div class="cart_item" v-for="(item,index) in winItems" :key="item">
				<!-- <img :src=uploads_url+item.thumb class="purchased_one_cart_item_img" /> -->
				<img width="140" :src=picArray3[index] />
				<div class="right">
					<div class="p1 flex" style="margin-right: 80px;">
						<div>
						<!-- 	<p v-if="item.huode !== '0'" class="p1"
								style="margin-top: 10px; margin-bottom: 10px; width:150; color: #EC4228;">Winning code:
								{{item.q_user_code}}
							</p> -->	 
							<!-- <p v-if="parseInt(item.gonumber) > 1" class="order_one_cart_item_img_text2" >Prize draw code: {{ getOneCode(item.goucode)}} </p> -->
							<!-- <p class="order_one_cart_item_img_text3"> {{convertTime(item.paytime2)}}</p> -->
							<p class="p1" style="margin-top:25px;margin-bottom: 10px; width:150">
								{{item.title.length > 12?item.title.substr(0,12)+"...":item.title}} 
							</p>
							<p class="p1" style="margin-top:-30px; margin-left: 160px;color: #EC4228;" v-if="item.huode !=='0'">WIN</p>
							<!-- 							<p class="description p1" style="margin:0; padding:0"
								v-if="one_item.description != undefined">
								{{one_item.description.length > 60 ? one_item.description.substr(0,60)+'...':one_item.description}}
							</p> -->
						</div>
					</div>
					<div class="p1 moneyNumber">
						<span class="money"
							style="color:#EC4228; margin-right:20px">AED:{{(item.yunjiage*item.gonumber).toFixed(2)}}</span>
						<van-button round v-if="item.huode !=='0'" class="get_reward_btn"
							@click="editAddress(item)">Get</van-button>
						<van-button round class="view_code_btn" v-if="parseInt(item.gonumber) >= 1 && item.huode ==='0'"
							@click="viewCode(item)">View code</van-button>
					</div>
				</div>
			</div>
			
			<order_form v-if="false" v-for="(item,index) in winItems" :key="item.id">
				<!-- {{index}} -->

				<template v-slot:order_one_cart_item_img>
					<!-- 			{{one_item.id}}
								{{uploads_url+one_item.id}} -->
					<!-- {{uploads_url+one_item.thumb}} -->
					<!-- <img src="../../assets/cart_item_img.png" class="order_one_cart_item_img" /> -->
					<img :src=uploads_url+item.thumb class="purchased_one_cart_item_img" />
				</template>

				<template v-slot:order_one_cart_item_desc>
					<!-- <img src="../../assets/cart_item_img.png" class="order_one_cart_item_desc" /> -->
					<div class="purchased_one_cart_item_desc">
						<p>{{item.title.length > 12?item.title.substr(0,12)+"...":item.title}} </p>
						<!-- <p>{{one_item.title}} </p> -->
					</div>
				</template>


				<template v-slot:order_one_cart_item_price>
					<div class="purchased_one_cart_item_price">
						<p>AED:{{(item.yunjiage*item.gonumber).toFixed(2)}}</p>
					</div>
				</template>

				<template v-slot:order_one_cart_item_right>
					<div class="purchased_one_cart_item_right">
						<slot name="order_one_cart_item_right">
							<!-- <van-button square text="state" /> -->
							<van-button round v-if="item.huode !=='0'" class="get_btn"
								@click="editAddress1(item)">Get</van-button>
						</slot>
						<van-button round class="view_code" v-if="parseInt(item.gonumber) >= 1 && item.huode ==='0'"
							@click="viewCode(item)">View code</van-button>
					</div>

				</template>

				<template v-slot:order_one_cart_item_right_del>
					<div class="purchased_one_cart_item_right_win">
						<!-- <slot name="order_one_cart_item_right_del"> -->
						<!-- <van-button square text="state" /> -->
						<p v-if="item.huode !=='0'">WIN</p>
						<!-- </slot> -->
					</div>
				</template>
			</order_form>
		</van-tab>
	</van-tabs>
	</div>
</template>

<script>
	import {
		Tab,
		Tabs,
		showToast
	} from 'vant';
	import {
		ref
	} from 'vue';

	// import draws_cart_item from "@/components/draws_cart_item"
	import globalData from '@/main.js'
	import {
		convertUnixToDate,
	} from "../util.js"
	import {
		split
	} from 'postcss/lib/list';


	export default {
		data() {
			return {
				title: "Purchase prize",
				uploads_url: '',
				allItems: {},
				toBeDrawItems: {},
				winItems: {},
				addressInfo: [],
				picArray1:{},
				picArray2:{},
				picArray3:{},
			}
		},
		beforeCreate() {

		},
		created() {
			console.log("---created---")
			this.uploads_url = globalData['uploads_url']
		},
		mounted() {
			console.log("---mounted---")
			this.userBuyList();
			this.toBeDraw();
			this.toWinner();
		},
		setup() {
			const active = ref(0);
			// const onClickTab = ({
			// 	title
			// }) => showToast(title);
			return {
				active,
				// onClickTab,
			};
		},
		methods: {
			goPrePage() {
				this.$router.back()
			},
			async userBuyList() {
				this.allItems = [];
				var that = this
				var uid = this.$cookies.get('uid')
				console.log("---toBeDraw start :" + 'shopajax/getUserBuyList/0/10/1/-1/' + uid)
				await this.axios({
					method: "GET", // method:"post" data:{"firstName":"Tom","lastName":"Sun"} //get params:{id:123}
					// url: globalData['mobile_url']+'home/userbuylist'
					url: globalData['mobile_url'] + 'shopajax/getUserBuyList/0/10/1/-1/' + uid,
				}).then(function(response) {
					//console.log("---that.userBuyList response---", response)
					that.allItems = response.data['listItems']
					
					for (let k in that.allItems) {
						var images = that.allItems[k].picarr;
						that.parsePicArr(k,images,1);
					}
					//console.log("---that.userBuyList", that.allItems)
				}).catch(function(error) { // 请求失败处理
					console.log(error);
				});
				// await this.toBeDraw();
				// console.log("===userBuyList toBeDrawItems===", this.toBeDrawItems)

				// await this.toWinner();
				// console.log("===userBuyList winItems===", this.winItems)

				// //setTimeout("this.toBeDraw", 3000)
				// //setTimeout("this.toWinner", 3000)	
				// this.allItems = this.toBeDrawItems
				// // console.log("yyyyy",this.winItems)
				// this.allItems = [...this.toBeDrawItems, ...this.winItems]
				// console.log("===userBuyList this.allItems===", this.allItems)
			},
			toMe: function() {
				this.$router.push('/profile')
			},
			async toBeDraw() {
				var that = this
				// console.log("---getAllGoods start :" + globalData['member_url']+'home/userbuylist/' )
				var uid = this.$cookies.get('uid')
				console.log("---toBeDraw start :" + 'shopajax/getUserBuyList/0/10/1/1/' + uid)
				await this.axios({
					method: "GET", // method:"post" data:{"firstName":"Tom","lastName":"Sun"} //get params:{id:123}
					// url: globalData['mobile_url']+'home/userbuylist'
					url: globalData['mobile_url'] + 'shopajax/getUserBuyList/0/10/1/1/' + uid,
				}).then(function(response) {
					//console.log("---that.toBeDrawItems response---", response)
					that.toBeDrawItems = response.data['listItems']
					for (let k in that.toBeDrawItems) {
						var images = that.toBeDrawItems[k].picarr;
						that.parsePicArr(k,images,2);
					}
					//console.log("---that.toBeDrawItems---", that.toBeDrawItems)
				}).catch(function(error) { // 请求失败处理
					console.log(error);
				});
			},
			async toWinner() {
				var that = this
				// console.log("---getAllGoods start :" + globalData['member_url']+'home/userbuylist/' )
				// console.log("---toWinner start :" + globalData['mobile_url'] + 'home/userbuylist')
				var uid = that.$cookies.get('uid')
				console.log("---toWinner start :" + globalData['mobile_url'] + 'shopajax/getUserOrderList/0/10/-1/' +
					uid)

				await this.axios({
					method: "GET", // method:"post" data:{"firstName":"Tom","lastName":"Sun"} //get params:{id:123}
					// url: globalData['mobile_url']+'home/userbuylist'
					url: globalData['mobile_url'] + 'shopajax/getUserOrderList/0/10/-1/' + uid

				}).then(function(response) {
					//console.log("===toWinner response===", response)
					that.winItems = response.data['listItems']
					//console.log("---toWinner that.winItems---", that.winItems)
					for (let k in that.winItems) {
						var images = that.winItems[k].picarr;
						that.parsePicArr(k,images,3);
					}
				}).catch(function(error) { // 请求失败处理
					console.log(error);
				});
			},
			editAddress: function(item) {
				console.log("===editAddress===", globalData['member_url'] + 'home/address')
				console.log("===editAddress===", globalData['mobile_url'] + 'home/address')
				console.log("===editAddress===item:", item)
				var that = this
				var uid = this.$cookies.get('uid')
				this.axios({
					method: "Get",
					// url: globalData['member_url']+  'home/address',
					url: globalData['mobile_url'] + 'home/address/' + uid,
				}).then(function(response) {
					console.log("editAddress response:", response)
					console.log("editAddress response data type:", typeof response.data)
					console.log("editAddress response data:", response.data)

					that.addressInfo = response.data;
					console.log("editAddress response length:", that.addressInfo.length)
					var contents = JSON.stringify(item);
					if (that.addressInfo.length > 0) {
						console.log("===that.addressInfo00xx===", that.addressInfo)
						contents += '|' + JSON.stringify(that.addressInfo)
						that.$router.push({
							name: 'shipped_information',
							params: {
								context: contents,
							}
						})
					} else {
						console.log("===that.addressInfo11xx===", that.addressInfo)
						contents += '|' + JSON.stringify(that.addressInfo)
						that.$router.push({
							name: 'win_lottery',
							params: {
								context: contents,
							}
						})
						// that.$router.push('/edit_address')
					}
				}).catch(function(error) { // 请求失败处理
					console.log(error);
				});
				// console.log("===this.addressInfo00===",this.addressInfo)
				// console.log("===this.addressInfo00xx===",this.addressInfo)

			},
			editAddress1: function(item) {
				// console.log("===editAddress1===",globalData['member_url']+  'home/address')
				console.log("===editAddress1===", globalData['mobile_url'] + 'home/address')
				console.log("===editAddress1===item:", item)

				var that = this
				var uid = this.$cookies.get('uid')

				this.axios({
					method: "Get",
					// url: globalData['member_url']+  'home/address',
					url: globalData['mobile_url'] + 'home/address/' + uid,
				}).then(function(response) {
					console.log("editAddress response 11 :", response)
					console.log("editAddress response data 11 type:", typeof response.data)
					console.log("editAddress response data 11 :", response.data)

					that.addressInfo = response.data;
					console.log("editAddress response 11 length:", that.addressInfo.length)
					var contents = JSON.stringify(item);
					if (that.addressInfo.length > 0) {
						console.log("===that.addressInfo 22 xx===", that.addressInfo)
						contents += '|' + JSON.stringify(that.addressInfo)
						that.$router.push({
							name: 'shipped_information',
							params: {
								context: contents,
							}
						})
					} else {
						console.log("===that.addressInfo 22 xx===", that.addressInfo)
						// that.$router.push('/edit_address')
						contents += '|' + JSON.stringify(that.addressInfo)
						that.$router.push({
							name: 'win_lottery',
							params: {
								context: contents,
							}
						})
					}
				}).catch(function(error) { // 请求失败处理
					console.log(error);
				});

			},
			viewCode: function(item) {
				// console.log("===editAddress1===",globalData['member_url']+  'home/address')
				console.log("===viewCode===item:", item)
				var contents = JSON.stringify(item);
				var that = this
				that.$router.push({
					name: 'view_code',
					params: {
						context: contents,
					}
				})
			},
			convertTime: function(timeStamp) {
				return convertUnixToDate(timeStamp)
			},
			getOneCode: function(code) {
				var codes = code.split(",");
				return codes[0]
			},
			parsePicArr:function(index,picArr,_index) {
				//console.log("===index===",picArr)
				//console.log("===picArr===",picArr)
				var infos = picArr.split(":");
				//console.log("===infos===",infos)
				for(var _info in infos) {
					//console.log("===_info===",infos[_info])
					//console.log("===_info===",typeof infos[_info])
					if(!infos[_info].includes("shopimg")) {
						continue
					}
					var newInfos = infos[_info].split(";");
					//console.log("===newInfos===",newInfos)
					for(var _info1 in newInfos) {
						//console.log("===newInfos[_info1]===",newInfos[_info1])
						if(!newInfos[_info1].includes("shopimg")) {
							continue
						}
						
						var imagestr = newInfos[_info1].split(";");
						//console.log("===images===",imagestr)
						var tmpIndex = 0;
						for(var _image in imagestr) {
							console.log("imagestr[_image]",imagestr[_image])
							
							if(tmpIndex++ != imagestr.length -1) {
								continue;
							}
							//console.log("imagestr[_image]22",imagestr[_image])
							var reg1 = new RegExp('"',"g")
							//console.log("imagestr[_image]",imagestr[_image].replace(reg1," "))
							if(imagestr[_image].includes("shopimg")) {
								//this.imageArray.push("require(\""+this.uploads_url+imagestr[_image].replace(reg1,"")+"\")")
								if( 1 == _index) {
									this.picArray1[index] = this.uploads_url+imagestr[_image].replace(reg1,"")								
								} else if( 2 == _index) {
									this.picArray2[index] = this.uploads_url+imagestr[_image].replace(reg1,"")
								}  else if( 3 == _index) {
									this.picArray3[index] = this.uploads_url+imagestr[_image].replace(reg1,"")
								}
							}
							//console.log("===this.picArray===:",this.picArray)
						}
					}	
				}
				//console.log("===this.imageArray===",this.imageArray)
			},
		}
	};
</script>

<style scoped lang="less">
	.left_btn {
		position: absolute;
		top: 2.5rem;
		left: 1rem;
		width: 2rem;
		height: 2rem;
		/* 		width: 2rem;
		height: 3rem; */
		z-index: 1;
	}
	.bg {
		height: calc(100vh - 6.5rem);
		/* overflow-y: auto; */
		background-color: #f8f8f8;
	}

	.cart_item {
		width: 100vw;
		height: 330px;
		// border:solid 1px red;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20px;
		box-sizing: border-box;
		background-color: white;
		margin-bottom: 20px;
		margin-top:40px
		// style="margin-bottom: 10px; background-color: #08080808; border-radius: 10px;"
	}

	.right {
		height: 100%;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		// padding-left: 10px;
		font-family: 'PingFang SC';
		font-size: 0.9rem;
		// padding:10px;
		box-sizing: border-box;

		position: relative;
		/* 添加相对定位 */
		left: -10px;
		/* 使用负边距将其向左移动 */
		width:60vw;
	}

	.p1 {
		margin: 0;
		padding: 0;
	}

	.money {
		font-size: 1.1rem;
		font-family: 'PingFang SC';
		color: #EC4228;
		margin-bottom: 30px;
	}

	.moneyNumber {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	
	.get_reward_btn {
		background-color: red;
		color: #fff;
		z-index: 1;
		font-size: 0.8rem;
		width: 6rem;
		height: 1.5rem;
		font-family: 'PingFang SC';
		margin-bottom:20px;
	}
	
	.view_code_btn {
		background-color: red;
		color: #fff;
		z-index: 1;
		font-size: 0.8rem;
		width: 6rem;
		height: 1.5rem;
		font-family: 'PingFang SC';
		margin-right: 10px;
		margin-bottom: 30px;
	}
	
	.description {
		padding-top: 40px;
		font-size: 0.7rem;
		// width: 100px;
		width: 250px;
		// border: solid 1px red;
	}

	:deep(.van-field__control--custom) {
		display: flex;
		justify-content: flex-end;
		zoom: 1.5;
	}

	:deep(.van-stepper__input) {
		width: 30px;
	}

	:deep(.van-cell) {
		background-color: transparent;
	}

	.flex {
		display: flex;
	}


	/* .left_btn2 {
		position: absolute;
		top: 2.8rem;
		left: 1rem;
	} */

	.button-group {
		background-color: crimson;
	}

	.subtab1 {
		margin-top: 1rem;
		/* 	width: 9.5rem;
		height: 9.5rem; */
	}

	.purchased_one_cart_item_img {
		position: relative;
		margin-top: 1rem;
		width: 30%;
		/* 调整图片宽度 */
		height: auto;
		/* 让高度自适应 */
		margin-left: 1rem;
		/* z-index: 2; */
		/* border: 0.1; */
		border-radius: 20px;

		/* border-style: dashed; */
	}

	.order_one_cart_item_img_text2 {
		/* position: relative;
		font-size: 0.6rem;
		margin-top: 0rem;
		margin-left:1rem;
		width: 12rem;
		font-family: 'PingFang SC'; */
		/* font-weight: bold; */
		/* color: #EC4228; */
		position: absolute;
		font-size: 0.6rem;
		margin-top: 0.5rem;
		/* 调整距离图片的垂直距离 */
		margin-left: 1rem;
		width: calc(70% - 1rem);
		/* 计算描述文本的宽度 */
		font-family: 'PingFang SC';
		color: #EC4228;
	}

	.order_one_cart_item_img_text3 {
		position: absolute;
		font-size: 0.6rem;
		/* left: 10rem; */
		top: 4rem;
		width: 12rem;
		left: calc(30% + 1.5rem);
		font-family: 'PingFang SC';
		/* font-weight: bold; */
		/* color: #EC4228; */
	}

	.purchased_one_cart_item_desc {
		/* position: relative;
		font-size: 1rem;
		left: 10rem;
		top: -7rem;
		width: 12rem;
		font-family: 'PingFang SC';
		font-weight: bold; */
		/* position: relative; */
		font-size: 1rem;
		position: absolute;
		top: 0.5rem;
		/* 调整描述文本与上方元素的间距 */
		left: calc(30% + 1.5rem);
		/* 让描述文本位于图片的右侧 */
		width: calc(70% - 1.5rem);
		/* 调整描述文本的宽度 */
		/* margin-top: 1rem; */
		/* 调整距离图片的垂直距离 */
		/*  margin-left: 1rem; */
		/* 调整距离左侧的水平距离 */
		/* width: calc(70% - 1rem); */
		/* 计算描述文本的宽度 */
		font-family: 'PingFang SC';
		font-weight: bold;

		overflow: hidden;
		/* 如果需要，可以添加溢出隐藏以防止文本溢出 */
		text-overflow: ellipsis;
		/* 如果需要，可以添加文本溢出时显示省略号 */
		white-space: nowrap;
		/* 如果需要，可以添加不换行 */
	}


	.purchased_one_cart_item_desc__1 {
		font-size: 1rem;
		position: relative;
		top: -8rem;
		/* margin-left: 8rem; */

		left: calc(30% + 1.5rem);
		/* 调整描述文本与图片的水平距离 */
		width: calc(70% - 2rem);
		/* 调整描述文本的宽度 */
		font-family: 'PingFang SC';
		font-weight: bold;

		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.purchased_one_cart_item_price {
		/* position: absolute;
		font-size: 1.1rem;
		left: 10rem;
		top: 5.5rem;
		width: 12rem;
		font-family: 'PingFang SC'; */
		/* font-weight: bold; */
		/* color: #EC4228; */
		/* position: absolute;
		    font-size: 1rem;
 		    top: 2.5rem;
 		    left: calc(30% + 1.5rem);
 		    width: calc(70% - 2rem);
 		    font-family: 'PingFang SC';
		    font-weight: bold;
		    color: #EC4228;
		
		    overflow: hidden;
		    text-overflow: ellipsis;
		    white-space: nowrap; */

		position: absolute;
		/* 将定位方式改为相对定位 */
		font-size: 1rem;
		/* 调整字体大小 */
		top: 5.5rem;
		/* 负值表示向上移动 */
		left: calc(30% + 1.5rem);
		/* 让价格文本与描述文本对齐 */
		width: calc(70% - 2rem);
		/* 调整价格文本的宽度 */
		font-family: 'PingFang SC';
		/* 			    font-weight: bold; */
		color: #EC4228;

		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.purchased_one_cart_item_right_win {
		position: absolute;
		font-size: 1.5rem;
		margin-left: 18.5rem;
		top: 0rem;
		/* height: 4rem; */
		width: 20rem;
		font-family: 'PingFang SC';
		font-weight: bold;
		color: #EC4228;
	}

	.purchased_one_cart_item_right {
		position: absolute;
		font-size: 2rem;
		margin-left: 17.5rem;
		top: 5.3rem;
		height: 4rem;
		width: 6rem;
		font-family: 'PingFang SC';
		font-weight: bold;
		color: #EC4228;
	}

	.get_btn {
		background-color: red;
		color: #fff;
		z-index: 1;
		font-size: 0.8rem;
		width: 6rem;
		height: 1.5rem;
		font-family: 'PingFang SC';
	}

	.view_code {
		/* position: absolute;
		margin-left:-1.5rem;
		top:7.3rem;*/

		/* 	font-size: 0.8rem;
		width: 6rem;
		height: 1.5rem;
		font-family: 'PingFang SC'; */
		position: absolute;
		/* 使用绝对定位 */
		top: 1rem;
		/* 与 .purchased_one_cart_item_price 顶部对齐 */
		/* left: calc(30% + 1.5rem); */
		/* left: calc(30% + 10rem); */
		left: -2rem;
		/* 与 .purchased_one_cart_item_price 水平对齐 */
		font-size: 0.8rem;
		width: 6rem;
		height: 1.5rem;
		font-family: 'PingFang SC';
	}

	.mytab {
		--van-tab-font-size: 1.2rem;
		--van-tab-line-height: 6rem;
		top: 1rem;
		font-weight: bold;
	}

	.van-toast__text {
		font-size: 1.5rem;
	}

	.van-toast {
		width: 80vw;
		/* 自定义宽度 */
		height: 10vh;
	}
</style>